//
// Created by baigui on 2021/10/18.
//

#ifndef SIMPLE_PLAYER_MP4DEMUX_H
#define SIMPLE_PLAYER_MP4DEMUX_H

#include "Demux.h"
#include "MediaPlayer.h"
#include <mediaStream.h>

class Mp4Demux : public Demux {
public:

    Mp4Demux(weak_ptr<MediaPlayer> player);

    ~Mp4Demux();

    bool Open(void *path) override;

    bool start() override;

    void handle(int , void *) override ;

    void requestbuffer() override;

private:
    MediaStream *mMediaStream;
    FILE        *fp = nullptr;

};


#endif //SIMPLE_PLAYER_MP4DEMUX_H
